package com.ztools.pc.service.card;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ztools.common.model.pc.card.CardRechargeRecord;
import com.ztools.common.util.common.PageUtil;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author seeTools
 * @since 2023-06-30
 */
public interface CardRechargeRecordService extends IService<CardRechargeRecord> {

    /**
     * 分页查询
     *
     * @param pageUtil 分页数据
     * @return 对象
     */
    Page<CardRechargeRecord> findList(PageUtil<CardRechargeRecord> pageUtil);


    /**
     * 根据对象查询
     *
     * @param cardRechargeRecord cardRechargeRecord
     * @return CardRechargeRecord
     */
    List<CardRechargeRecord> findByObject(CardRechargeRecord cardRechargeRecord);


    /**
     * 修改
     *
     * @param cardRechargeRecord cardRechargeRecord
     * @return boolean
     */
    boolean update(CardRechargeRecord cardRechargeRecord);

    /**
     * 删除
     *
     * @param cardRechargeRecord cardRechargeRecord
     * @return boolean
     */
    boolean delete(CardRechargeRecord cardRechargeRecord);

    /**
     * 储值卡充值
     *
     * @param cardRechargeRecord cardRechargeRecord
     */
    void recharge(CardRechargeRecord cardRechargeRecord);

    /**
     * 导出
     *
     * @param response           response
     * @param cardRechargeRecord cardRechargeRecord
     */
    void exportExcel(HttpServletResponse response, CardRechargeRecord cardRechargeRecord);

    /**
     * 根据字段查询数据
     *
     * @param fieldName fieldName
     * @param value     value
     * @return CardRechargeRecord
     */
    List<CardRechargeRecord> findBy(String fieldName, Object value);
}
